let arr = [3, 2, 4, 1, 5, 6];


function bettwen(a, b) {
	return function(v) {
		return a <= v && v <= b;
	}
}
console.log(arr.filter(bettwen(3, 5)))


